package com.example.sunmiv1.activity;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.WindowManager;
import android.widget.ImageView;
import android.widget.TextView;

import com.example.sunmiv1.R;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class ChooseWarehousingActivity extends Activity {

    @BindView(R.id.title_back)
    ImageView titleBack;
    @BindView(R.id.title_title)
    TextView titleTitle;
    @BindView(R.id.add_chooseWarehousing)
    TextView addChooseWarehousing;
    @BindView(R.id.out_chooseWarehousing)
    TextView outChooseWarehousing;

    private Context context;
    private Intent intent;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
        setContentView(R.layout.activity_choose_warehousing);
        ButterKnife.bind(this);
        titleTitle.setText(R.string.warehousingTitle);
        context = this;
    }

    @OnClick({R.id.title_back, R.id.add_chooseWarehousing,R.id.out_chooseWarehousing})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.title_back:
                finish();
                break;
            case R.id.add_chooseWarehousing:
                intent = new Intent(context, GoodWarehousingActivity.class);
                startActivity(intent);
                break;
            case R.id.out_chooseWarehousing:
                intent = new Intent(context, StoreAllocationActivity.class);
                startActivity(intent);
                break;
        }
    }
}
